<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:scrollbarFadeDuration="0"
    android:scrollbars="vertical"
    tools:context=".InstallActivity">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="16dp"
        android:layout_marginRight="16dp"
        android:layout_marginBottom="16dp"
        android:orientation="vertical">

        <LinearLayout
            android:id="@+id/tooLowMemory"
            style="@style/DownloadActivitySegment"
            android:background="@color/warningOrange"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/too_low_memory_title" />

            <TextView
                android:id="@+id/tooLowMemoryDescription"
                style="@style/DefaultTextView" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/unknownSignatureOfInstalledApp"
            style="@style/DownloadActivitySegment"
            android:background="@color/errorRed"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/unknown_signature_of_installed_app_text1" />

            <TextView
                style="@style/BoldTextView"
                android:text="@string/unknown_signature_of_installed_app_text2" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/externalStorageNotAccessible"
            style="@style/DownloadActivitySegment"
            android:background="@color/errorRed"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/external_storage_not_accessible" />

            <TextView
                style="@style/MonospaceSelectableTextView"
                android:id="@+id/externalStorageNotAccessible_state"
                android:text="" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/downloadAppIsDisabled"
            style="@style/DownloadActivitySegment"
            android:background="@color/errorRed"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/download_app_is_disabled" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/fetchUrl"
            style="@style/DownloadActivitySegment">

            <TextView
                android:id="@+id/fetchUrlTextView"
                style="@style/BoldTextView"
                android:text="@string/fetch_url_for_download" />

            <ProgressBar
                style="?android:attr/progressBarStyle"
                android:layout_width="60dp"
                android:layout_height="60dp"
                android:layout_gravity="center" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/fetchedUrlSuccess"
            style="@style/DownloadActivitySegment">

            <TextView
                android:id="@+id/fetchedUrlSuccessTextView"
                style="@style/BoldTextView"
                android:text="@string/fetched_url_for_download_successfully" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/downloadingFile"
            style="@style/DownloadActivitySegment">

            <TextView
                android:id="@+id/downloadingFileText"
                style="@style/BoldTextView"
                android:text="@string/download_application_from_with_status" />

            <TextView
                android:id="@+id/downloadingFileUrl"
                style="@style/MonospaceSelectableTextView" />

            <ProgressBar
                android:id="@+id/downloadingFileProgressBar"
                style="?android:attr/progressBarStyleHorizontal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/downloadedFile"
            style="@style/DownloadActivitySegment">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/downloaded_application_from" />

            <TextView
                android:id="@+id/downloadedFileUrl"
                style="@style/MonospaceSelectableTextView" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/downloadFileFailed"
            style="@style/DownloadActivitySegment"
            android:background="@color/errorRed"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/download_failed" />

            <TextView
                android:id="@+id/downloadFileFailedUrl"
                style="@style/MonospaceSelectableTextView" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/verifyDownloadFingerprint"
            style="@style/DownloadActivitySegment">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/verifying_downloaded_application_certificate" />

            <ProgressBar
                style="?android:attr/progressBarStyle"
                android:layout_width="60dp"
                android:layout_height="60dp"
                android:layout_gravity="center" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/fingerprintDownloadGood"
            style="@style/DownloadActivitySegment"
            android:background="@color/successGreen"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/downloaded_application_is_verified" />

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/sha_256_certificate_fingerprint" />

            <TextView
                android:id="@+id/fingerprintDownloadGoodHash"
                style="@style/MonospaceSelectableTextView" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/installConfirmation"
            style="@style/DownloadActivitySegment">

            <Button
                android:id="@+id/installConfirmationButton"
                style="@style/DefaultButton"
                android:text="@string/install_application" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/fingerprintDownloadBad"
            style="@style/DownloadActivitySegment"
            android:background="@color/errorRed"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/downloaded_application_is_not_verified" />

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/expected_sha_256_certificate_fingerprint" />

            <TextView
                android:id="@+id/fingerprintDownloadBadHashExpected"
                style="@style/MonospaceSelectableTextView" />

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/but_was" />

            <TextView
                android:id="@+id/fingerprintDownloadBadHashActual"
                style="@style/MonospaceSelectableTextView" />

            <TextView
                style="@style/DefaultTextView"
                android:layout_marginTop="8dp"
                android:text="@string/invalid_downloaded_certificate_fingerprint_explanation"
                android:textIsSelectable="true" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/installingApplication"
            style="@style/DownloadActivitySegment">

            <ProgressBar
                style="?android:attr/progressBarStyle"
                android:layout_width="60dp"
                android:layout_height="60dp"
                android:layout_gravity="center" />
        </LinearLayout>


        <LinearLayout
            android:id="@+id/verifyInstalledFingerprint"
            style="@style/DownloadActivitySegment">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/verifying_downloaded_application_certificate" />

            <ProgressBar
                style="?android:attr/progressBarStyle"
                android:layout_width="60dp"
                android:layout_height="60dp"
                android:layout_gravity="center" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/fingerprintInstalledGood"
            style="@style/DownloadActivitySegment"
            android:background="@color/successGreen"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/installed_application_is_verified" />

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/sha_256_certificate_fingerprint" />

            <TextView
                android:id="@+id/fingerprintInstalledGoodHash"
                style="@style/MonospaceSelectableTextView" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/fingerprintInstalledBad"
            style="@style/DownloadActivitySegment"
            android:background="@color/errorRed"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/installed_app_is_not_verified" />

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/expected_sha_256_certificate_fingerprint" />

            <TextView
                android:id="@+id/fingerprintInstalledBadHashExpected"
                style="@style/MonospaceSelectableTextView" />

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/but_was" />

            <TextView
                android:id="@+id/fingerprintInstalledBadHashActual"
                style="@style/MonospaceSelectableTextView" />

            <TextView
                style="@style/DefaultTextView"
                android:layout_marginTop="8dp"
                android:text="@string/invalid_installed_certificate_fingerprint_explanation"
                android:textIsSelectable="true" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/installerSuccess"
            style="@style/DownloadActivitySegment"
            android:background="@color/successGreen"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/application_successfully_installed" />

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/you_can_now_close_this_window" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/installerFailed"
            style="@style/DownloadActivitySegment"
            android:background="@color/errorRed"
            android:padding="8dp">

            <TextView
                style="@style/BoldTextView"
                android:text="@string/application_installation_was_not_successful" />

            <TextView
                android:id="@+id/installerFailedReason"
                style="@style/MonospaceSelectableTextView" />

            <TextView
                style="@style/DefaultTextView"
                android:text="@string/you_can_now_close_this_window" />

        </LinearLayout>

    </LinearLayout>

</androidx.core.widget.NestedScrollView>